﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ddcCajamarca.BusinessEntities.Directorio;
using System.Data.Entity.ModelConfiguration;
using System.ComponentModel.DataAnnotations.Schema;

namespace ddcCajamarca.Repository.Mapping
{
    public class VocativoMap : EntityTypeConfiguration<Vocativo>
    {
        public VocativoMap()
        {
            this.HasKey(c => c.Id);

            this.Property(c => c.Id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            this.Property(c => c.Descripcion)
                .HasMaxLength(100)
                .IsRequired();

            this.Property(c => c.Abreviatura)
                .HasMaxLength(15)
                .IsOptional();

            this.ToTable("Vocativo");
            this.Property(c => c.Id).HasColumnName("Id");
            this.Property(c => c.Descripcion).HasColumnName("Descripcion");
            this.Property(c => c.Abreviatura).HasColumnName("Abreviatura");
        }
    }
}
